A semiconductor device such as a metal oxide semiconductor field effect transistor (MOSFET) is used in applications such as power conversion. It is desired that the semiconductor device have high reliability.